package com.coda.app.service.impl;

import com.coda.app.mapper.LeaseTermMapper;
import com.coda.app.service.LeaseAgreementService;
import com.coda.app.service.LeaseTermService;
import com.coda.entity.LeaseTerm;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class LeaseTermServiceImpl implements LeaseTermService {

    @Autowired
    private LeaseTermMapper leaseTermMapper;

    /**
     * 根据房间id获取可选租期
     * @param id
     * @return
     */
    @Override
    public List<LeaseTerm> getTermList(Long id) {
        List<LeaseTerm> leaseTermList = leaseTermMapper.getLeaseTermByRoomId(id);
        return leaseTermList;
    }
}
